//
//  ChoiceLoginWayView.m
//  beautyLamp
//
//  Created by Tam Kwok To Michael on 2017/10/17.
//  Copyright © 2017年 Tam Kwok To Michael. All rights reserved.
//

#import "ChoiceLoginWayView.h"

@interface ChoiceLoginWayView()

@property (weak, nonatomic) IBOutlet UIButton *loginIcon;
@property (weak, nonatomic) IBOutlet UILabel *loginTitle;

@end

@implementation ChoiceLoginWayView


+ (instancetype)choiceLoginWayView {
    ChoiceLoginWayView *loginWay = [[[NSBundle mainBundle] loadNibNamed:@"ChoiceLoginWayView" owner:nil options:nil] lastObject];
    return loginWay;
}

- (void)awakeFromNib {
    [super awakeFromNib];
}

- (void)setIcon:(NSString *)icon {
    _icon = icon;
    UIImage *image = [UIImage imageNamed:icon];
    [self.loginIcon setImage:image forState:UIControlStateNormal];
}

- (void)setTitle:(NSString *)title {
    _title = title;
    self.loginTitle.text = title;
}

- (IBAction)doLogin:(id)sender {
        [_delegate toLogin:_icon];
}



@end
